﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Rainbow.ConsoleApplications;
using Rainbow.Demo.Objectflow.Client;
using Rainbow.ObjectFlow.Framework;
using Rainbow.ObjectFlow.Interfaces;

namespace objectflow.branches
{
    class Program
    {
        static void Main(string[] args)
        {
            var ansi = new AnsiCmd();
            ansi.SetBackGround(ConsoleColor.White);
            ansi.SetForeGround(ConsoleColor.Black);

            var commandline = new CommandLine(ansi, "Sub workflows (branches)");
            ansi.ClearScreen();

            var customerWorkflow = new CoffeeCustomerService();

            var workflow = new Workflow<CustomerState>();
            
            workflow.Do(customerWorkflow);
            workflow.Start(new CustomerState());

            commandline.DisplayWaitForAnyKeyMessage();
            commandline.WaitForKeyPress();

        }
    }
}
